﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="_619BJP.Models"%>
<%@ Import Namespace="_619BJP.Web.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	   619保健品点评网
</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
  <link href="../../Content/css/Instance/Product/ProductList.css" rel="stylesheet"
        type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div id="navigation">
        <span>你现在的位置： <a href="/Home/Index">首页</a> ></span> 
        <span > <a href="/Product/ProductIndex">保健品</a>></span>
        <span> <%=ViewData["cate_name"]%></span></div>
    <div id="productlist">
    
   
<%--   <div class="list_header">
   <ul >
    <li class="listtile"><h2><%=ViewData["cate_name"]%></h2> </li>
   <li > 产品排序：</li>
    <li class="filter-toolbar">
   
    <div class="sort_default">
    </div>
     <div class="sort_price">
    </div>
     <div class="sort_comments">
    </div>
    
    </li>
    
   </ul>
   </div>--%>
        <%System.Data.DataSet ds = (System.Data.DataSet)ViewData.Model;
        if (ds.Tables[0].Rows.Count > 0)
        {
        %>
       <ul class="ul_product_list">
        <%for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
          {%>
          <li>
            <a href="/Product/ProductDetails/<%=ds.Tables[0].Rows[i]["id"].ToString()%>"><img class="product_pic" src="../..<%=ds.Tables[0].Rows[i]["img_url"].ToString()%>" /></a>
            <div class="des">
                <div class="pname" ><a href="/Product/ProductDetails/<%=ds.Tables[0].Rows[i]["id"].ToString()%>"><%=ds.Tables[0].Rows[i]["product_name"].ToString()%></a></div>
                <div class="hits"><label>点击数：</label>  <em><%=ds.Tables[0].Rows[i]["view_count"].ToString()%></em></div>
  <%--              <div class="average_score"><label>平均分数：</label><img src="../../Content/images/star_1.jpg" />   80</div>--%>
                <div class="price"><label>参考价格：</label> ￥<em><%=ds.Tables[0].Rows[i]["market_price"].ToString()%></em></div>
                <div class="desc"><label>产品介绍：</label>
                    <% string pro_des = (new ArticleController()).TitleForShort(ds.Tables[0].Rows[i]["description"].ToString(), 200) + "...";%>
                    <%=pro_des %>
                </div>
            </div>
          </li>
          <%} %>
       </ul>

        <div id="page_turn">
		    <ul id="page_turn_list">
			    <li id="page_turn_next_page" class="page_turn_other_page"><a href="#">下一页</a></li>
			    <li class="page_turn_other_page"><a href="#">13</a></li>
			    <li class="page_turn_ellipsis">...</li>
			    <li class="page_turn_other_page"><a href="#">5</a></li>
			    <li class="page_turn_other_page"><a href="#">4</a></li>	
			    <li class="page_turn_other_page"><a href="#">3</a></li>
			    <li class="page_turn_other_page"><a href="#">2</a></li>
			    <li class="page_turn_now_page"><a href="#">1</a></li>
		    </ul>
             <%}
          else
          {%>
          暂无
            <%} %>
	    </div>
    </div>

    <div id="like">
        <div class="title">您可能喜欢</div>
        <%System.Data.DataSet like_ds = (new ProductController()).GetLikeProducts(int.Parse(ViewData["cate_id"].ToString()), 4);
          if (like_ds.Tables[0].Rows.Count > 0)
          {
         %>
        <ul>
             <%for (int j = 0; j < like_ds.Tables[0].Rows.Count; j++)
               {%>
            <li>
                <a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><img src="../..<%=like_ds.Tables[0].Rows[j]["img_url"].ToString() %>"/></a>
                <div class="prodcut_name"><a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><%=like_ds.Tables[0].Rows[j]["product_name"].ToString()%></a></div>
            </li>
            <%} %>
        </ul>
        <%}else{ %>暂无
        <%}%>
    </div>

<%--        <div id="browsing_history">
           <div class="title">你的浏览记录 <a>清空</a> </div>
           <ul>
           <li>
           <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 产品描述 产品描述 产品描述 
            </div>
           </li>
           <li>
            <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 产品描述 产品描述
            </div>
           </li>
           <li>
            <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 
            </div>
           </li>
           </ul>

         </div>

          <div id="advert_1">
          
          <img  src="../../AdImages/ad_1.jpg" alt=""/>

         </div>--%>

</asp:Content>
